#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc, char *argv[])
{
    int i, j;
    FILE *f = fopen("output.txt", "w");
    srand(time(NULL));
    for (i = 1; i < 10; i++)
    {
        for (j = 1; j <= i; j++)
        {
            fprintf(f, "%d*%d=%-6d", j, i, i * j);
        }
        fprintf(f, "\n");
    }
    fclose(f);

    return 0;
}
